<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">

$(document).ready(function(){
	var s_id = getCookie_("_p_id");
	if(s_id!=""){
		$("#p_id").val(s_id);
	}
});
//쿠키설정후 팝업숨기기
function cookieSet()
{
	var oDate, expiresDate;
	oDate = new Date();
	oDate.setDate(oDate.getDate() + 365);        
	expiresDate = oDate.toGMTString();
	document.cookie = "_p_id="+$("#p_id").val()+"; expires=" + expiresDate + "; path=/;";
}

//쿠키가져오기
function getCookie_( name ){
	   var nameOfCookie = name + "=";
	   var x = 0;
	   while ( x <= document.cookie.length ){
	        var y = (x+nameOfCookie.length);
	        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
	             if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
	                  endOfCookie = document.cookie.length;
	             return unescape( document.cookie.substring( y, endOfCookie ) );
	        }
	        x = document.cookie.indexOf( " ", x ) + 1;
	        if ( x == 0 )
	            break;
	    }
	return "";
	}
function sendData(){
	if($("#idChk:checked").length==1){
		cookieSet();	
	}
	
	$("#frmData").submit();
}
</script>
<form action="./pere901Q.do"  id="frmData" method="post">
	<input name="chk_p_id" value="${param.p_id }" type="hidden"/>
	<table border="0" cellspacing="2" cellpadding="0" bgcolor="#1667a0">
		<tr>
			<td bgcolor="#fafafa" style="padding: 10px;"><table width="100%"
					border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>캠핑주 로그인</td>
					</tr>
				</table>
				<table width="200" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="44"><img src="/usr/images/loginw_id.gif" width="31"
								height="12"></td>
							<td width="5">&nbsp;</td>
							<td><input type="text" name="p_id" id="p_id" size="15" tabindex="1" value=""></td>
							<td width="5">&nbsp;</td>
							<td width="61" rowspan="2">
								<a href="#" onclick="sendData();">
									<img src="/usr/images/loginw_btn_login.gif" width="61" height="48" tabindex="3">
								</a>
							</td>
						</tr>
						<tr>
							<td><img src="/usr/images/loginw_password.gif" width="44"
								height="12"></td>
							<td>&nbsp;</td>
							<td><input type="password" name="p_pwd" size="15" value=""
								tabindex="2"></td>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
							<td align="right"><label> </label>
								<table border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td><input type="checkbox" name="checkbox" id="idChk"></td>
										<td><img src="/usr/images/loginw_idsave.gif" width="50"
											height="11"></td>
									</tr>
								</table></td>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
						</tr>
				</table></td>
		</tr>
	</table>
</form>